package com.yanmaohu.yulia.statement;

import com.yanmaohu.yulia.bean.GranteeList;
import com.yanmaohu.yulia.bean.Grantor;
import com.yanmaohu.yulia.bean.IdentifierList;

/**
 * @author Bright Lee
 */
public final class GrantRoleStatement implements GrantStatement {

    private int beginIndex;
    private int endIndex;
    private IdentifierList roleGrantedList;
    private GranteeList granteeList;
    private boolean withAdminOption;
    private Grantor grantor;

    public GrantRoleStatement(int beginIndex,
                              int endIndex,
                              IdentifierList roleGrantedList,
                              GranteeList granteeList,
                              boolean withAdminOption,
                              Grantor grantor) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.roleGrantedList = roleGrantedList;
        this.granteeList = granteeList;
        this.withAdminOption = withAdminOption;
        this.grantor = grantor;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public IdentifierList getRoleGrantedList() {
        return roleGrantedList;
    }

    public GranteeList getGranteeList() {
        return granteeList;
    }

    public boolean isWithAdminOption() {
        return withAdminOption;
    }

    public Grantor getGrantor() {
        return grantor;
    }

}
